package com.itheima.springbootwebtlias.controller;


import com.itheima.springbootwebtlias.pojo.PageResult;
import com.itheima.springbootwebtlias.pojo.Result;
import com.itheima.springbootwebtlias.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/log/page")
public class Logcontroller {

    @Autowired
    private LogService logService;

    //日志分页查询
    @GetMapping
    public Result page(Integer page ,Integer pageSize){
        PageResult pageResult = logService.page(page,pageSize);

        return Result
                .success(pageResult);
    }
}
